package com.homework.first;

import java.util.Scanner;//打入Scanner后自动出来的

/**
 * @author YuFeng
 * @Title: Course_StudentManagement
 * @Description:
 * @date 2020/4/1411:23
 */
public class Course_StudentManagement {
    public static void main(String[] args) {
        System.out.println("请输入课程数量：");
        Scanner courseCount = new Scanner(System.in);
        int numberOfCourse = courseCount.nextInt();
        //nextInt()用于读入整型数据
//为什么这里要用numberOfCourse和courseCount，两者意思不是一样的吗？因为courseCount已先被Scanner下定义，所以int不能直接用，换一个意思相近即可
        Course[] courseCounts = new Course[numberOfCourse];
        //创建对象数组,courseCounts[]为对象数组
        for (int i = 0; i < courseCounts.length; i++) {
            courseCounts[i] = new Course();
//创建对象，为对象数组的每个元素创建所指向的对象Course
        }

        String course1 = "chinese";
        String course2 = "english";
        String course3 = "math";
        System.out.println("请输入课程1：" + course1 + ";请输入课程2：" + course2 + ";请输入课程3:" + course3);


        System.out.println("请输入学生数量：");
        Scanner studentCount = new Scanner(System.in);
        int numberOfStudent = studentCount.nextInt();
        Student[] studentCounts = new Student[numberOfStudent];
        //创建对象数组，studentCounts[]为对象数组；int后为numberOfStudent，new Student[]中也为numberOfStudent

        for (int j= 0; j < studentCounts.length; j++) {




            studentCounts[j] = new Student();
        }
        String student1 = "zyf";
        String student2 = "yf";
        System.out.println("请输入学生1：" + student1 + ";请输入学生2：" + student2);


        System.out.println("请输入" + student1 + "的选课数量:");
       Scanner selectOfCourseCount = new Scanner(System.in);
       int countOfSelectOfCourse = selectOfCourseCount.nextInt();


        System.out.println("请输入该学生所选课的名称：");
        Scanner student1Select = new Scanner(System.in);
        String selectOfStudent1 = student1Select.nextLine();
        Student student1Selects = new Student(selectOfStudent1);
        for (int k = 0; k < courseCounts.length; k++) {
            courseCounts[k] = new Course();


        }


    }

}
